< previous page page_42 next page >

Page 42
TABLE 1.1.CONTINUED
PropertyValueOrientation Vertical or Horizontal
ProgressBar Control
NameprgStatus
VisibleFalse
OrientationVertical or Horizontal
ScrollingSmooth or Standard
Label Control
NamelblDisplay
CaptionLeave blank
Command Button Control 1
NamecmdQuit
CaptionQuit
Command Button Control 2
NamecmdCopy
CaptionFile Copy

To get the code to copy the file while your application executes other commands, use the Get and Put file statements to read data from the source file and write it to the destination file. Both files will be opened by using the Binary option of the Open file statement. Only two events need code in this application:
For the cmdQuit_Click event, you need only the command END to finish the execution of the application.
For the cmdCopy_Click event, add the code in Listing 1.1 to perform all the necessary tasks.
LISTING 1.1FRMFILECOPY.TXTTHE FILE-COPY ROUTINE USED TO COPY A FILE WITHIN AN APPLICATION.

8694cbadb9b1ef7075903f6f95fc1db2.gif
 1: Private Sub cmdCopy_Click()
 2: Dim lngFileSize As Long
 3: Dim intLoopCtr As Integer
 4: Dim intBufferCount As Integer
 5: Dim strInByte As String * 256
 6: Dim strFrom_filename As String
 7: Dim strTo_filename As String
 8: Dim strAvi_Filename As String

 
< previous page page_42 next page >

If you like this book, buy it!